package com.jiazhong.IO流.字符文件流;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.nio.charset.Charset;

public class FileReaderDemo {
    public static void main(String[] args) throws IOException {
        //创建文件字符流对象
        FileReader reader = new FileReader("D:\\Study\\MySQL8\\mysql-8.0.26-winx64\\mysql-8.0.26-winx64\\安装说明.txt");
        char[] cs = new char[1024];
        int len = -1;
        while((len = reader.read(cs)) != -1){
            String s = String.valueOf(cs, 0, len);
            System.out.println(s);
        }
        reader.close();

    }
}
